import Vue from 'vue'
export default {
  state: {
    // 图片上传服务器地址
    ossServer:'',
    // 图片下载服务器地址
    imageServer:'',
    // 选项卡激活变量
    prodActiveTabName: 'prod-list',
    // 当前处理的SPU
    prodCurrentSpu:{},
    // 当前处理的SPU图片列表
    prodCurrentSpuImages:[],
    // 可显示的商品分类数据
    prodCates:[],
    // 新建SKU表单数据绑定
    prodNewSkuFormData:{},
    // 当前处理的SKU
    prodCurrentSku:{},
    // 当前正在修改的SKU
    prodCurrentModifyingSku:{},
    // 所有商品分类数据
    allProdCates:[]
  },

  mutations: {

    setOssServer:function (state,ossServer) {
      Vue.set(state,'ossServer',ossServer);
    },

    setImageServer:function (state,imageServer) {
      Vue.set(state,'imageServer',imageServer);
    },

    setProdActiveTabName:function (state,prodActiveTabName) {
      Vue.set(state,'prodActiveTabName',prodActiveTabName)
    },

    setProdCurrentSpu:function (state,prodCurrentSpu) {
      Vue.set(state,'prodCurrentSpu',prodCurrentSpu);
    },

    setProdCurrentSpuImages:function (state,prodCurrentSpuImages) {
      Vue.set(state,'prodCurrentSpuImages',prodCurrentSpuImages);
    },

    setProdCates:function (state,prodCates) {
      Vue.set(state,'prodCates',prodCates);
    },

    setProdNewSkuFormData:function (state,prodNewSkuFormData) {
      Vue.set(state,'prodNewSkuFormData',prodNewSkuFormData);
    },

    setProdCurrentSku:function (state,prodCurrentSku) {
      Vue.set(state,'prodCurrentSku',prodCurrentSku);
    },

    setProdCurrentModifyingSku:function (state,prodCurrentModifyingSku) {
      Vue.set(state,'prodCurrentModifyingSku',prodCurrentModifyingSku);
    },

    setAllProdCates:function (state,allProdCates) {
      Vue.set(state,'allProdCates',allProdCates);
    }

  }
}
